"""
@author: yjx
@file: 04.读取scwebsite2_ssl.log文件.py
@time: 2023/4/20 15:58
"""
import numpy as np
import os

# 读取scwebsite2_ssl.log文件，统计总共有多少个ip访问过
flag = 0
tmp = []
# 读取文件
for line in open("scwebsite2_ssl.log", "r", encoding="utf-8"):
    # ip = 175.8.134.46
    ip = line[0:12]
    if ip not in tmp:
        flag += 1
        tmp.append(ip)
print(f"一共有{flag}访问过")
print(f"这些ip是{tmp}")
